<template>
    <div>
        <input type="text" v-model="msg" />
        <button @click="sendmsg">点我发送给父组件</button>
        <button @click="offEvent">点我解绑自定义事件</button>
    </div>
</template>

<script>
export default {
    name: "Student",
    data() {
        return {
            msg: "",
        };
    },
    methods: {
        sendmsg() {
            this.$emit("myevent", this.msg);
        },
        offEvent() {
            this.$off();
            // this.$off(["myevent", "identifiedEvent"]);
            // this.$off("myevent");
        },
    },
};
</script>

<style></style>
